aliases:
- 如何使用NPS进行内网穿透?
nps
go build cmd/nps/nps.go
wget ...
tar -zxf ...
sudo ./nps install
/etc/nps/conf/nps.conf
sudo nps start
sudo nps stop
sudo nps restart
go build cmd/npc/npc.go
wget https://github.com/ehang-io/nps/releases/download/v0.26.10/freebsd_amd64_client.tar.gz
tar -zxf freebsd_amd64_client.tar.gz
sudo apt install golang
./npc -server=47.116.9.145:8024 -vkey=ei3d2n7un4nvibio -type=tcp
//Docker
sudo docker run -d --name npc --net=host ffdfgdfg/npc -server=47.116.9.145:8024 -vkey=otyjfifsuhk3hw7i -type=tcp
docker logs npc
docker run -d --name npc --net=host ffdfgdfg/npc -server=<ip:port> -vkey=<web界面中显示的密钥> <以及一些其他参数>
docker run -d --name npc --net=host ffdfgdfg/npc -server=47.116.9.145:8024 -vkey=otyjfifsuhk3hw7i -type=tcp
docker run -d --name npc --net=host -v <本机conf目录>:/conf ffdfgdfg/npc -config=/conf/npc.conf
/home/szy/npc/start.sh
#!/bin/bash
cd /home/szy/npc/
./npc -server=... -vkey=... -type=tcp
/etc/systemd/system/npc.service
[Unit]
Description=npc
After=network.target
[Service]
Type=simple
ExecStart=/home/szy/npc/start.sh
[Install]
WantedBy=multi-user.target
service
systemctl daemon-reload
systemctl enable npc #设置开机启动
systemctl start npc #开启服务
systemctl status npc #查看状态
systemctl restart npc
sudo docker run -d --name=nps --restart=always --net=host -v /opt/nps/conf:/conf ffdfgdfg/nps
下载nps client
wget https://github.com/ehang-io/nps/releases/download/v0.26.10/darwin_amd64_client.tar.gz
./npc install -server=47.116.9.145:8024 -vkey=2fli9cfljqj6efvf -type=tcp
sudo curl -sSL https://get.daocloud.io/docker | sh